Collabs 接口文档

创建时间: 2026-02-26 相关页面: /collabs (抢断分离界面)


页面概述

Collabs 页面用于管理推广者(Promoters)和合作店铺(Partnered Shops)的协作关系。


页面初始加载 (Server-side)

进入 https://release.pear.us/collabs 时,会并行发起 3 个请求

# Method Endpoint 说明
1 GET /promoter-association/collabs/promoters 获取"我的推广者"列表
2 GET /promoter-association/collabs/curators 获取"合作店铺"列表
3 GET /promoter-invitation-link/invitation-link 获取邀请链接列表

详细操作 API

推广者相关

Method Endpoint 说明
GET /promoter-association/{id}/detail 获取推广者详情
GET /promote-invitation/{id}/my-merchants 获取推广者的商品目录
PUT /promoter-association/{id} 更新备注
DELETE /promoter-association/promoter/{id} 断开推广者连接
PUT /promote-invitation/{id} 批量更新目录访问权限和佣金

合作店铺相关

Method Endpoint 说明
GET /promoter-association/collabs/curator/{curatorId} 获取合作店铺详情
PUT /promoter-association/{promoterAssociationId}/promoter 更新同步设置
DELETE /promoter-association/curator/{id} 断开合作店铺

邀请链接管理

Method Endpoint 说明
POST /promoter-invitation-link/invitation-link 创建邀请链接
PUT /promoter-invitation-link/invitation-link/{id} 更新邀请链接
DELETE /promoter-invitation-link/invitation-link/{id} 删除邀请链接

其他辅助 API

Method Endpoint 说明
GET /user/public/{vanityUrl} 根据 vanityUrl 获取公开用户信息

前端代码位置

页面组件

文件路径 说明
apps/web/src/app/(pages)/collabs/page.tsx Collabs 主页面
apps/web/src/app/(pages)/collabs/[vanityUrl]/page.tsx 推广者详情页
apps/web/src/app/(pages)/collabs/partnered/[curatorId]/page.tsx 合作店铺详情页

服务层

文件路径 说明
apps/web-common/services/promoter/promoterAssociation.ts 核心服务文件,定义所有 API 调用

状态管理

文件路径 说明
apps/web/src/atoms/stores/collabsAtom.ts Collabs 状态管理

请求示例

获取推广者列表

GET /promoter-association/collabs/promoters?orderByCreatedAt=true

断开推广者连接

DELETE /promoter-association/promoter/{id}

更新推广者备注

PUT /promoter-association/{id}
Content-Type: application/json

{
  "note": "更新后的备注内容"
}

标签

api #collabs #promoter #curator #协作

results matching ""

    No results matching ""